package com.aliyun.messagemgt.domain.repository;

import com.aliyun.messagemgt.dto.base.BaseReceiveGroupAddCmd;
import com.aliyun.messagemgt.dto.base.BaseReceiveGroupDTO;
import com.aliyun.messagemgt.dto.base.BaseReceiveGroupQry;
import com.aliyun.messagemgt.dto.base.BaseReceiveGroupUpdateCmd;
import com.github.pagehelper.PageInfo;

import java.util.List;

/**
 * <p>
 * 基础表-接收组表 服务类
 * </p>
 *
 * @author wugongzi
 * @since 2021-09-28
 */
public interface IBaseReceiveGroupRepository {

    /**
     * 接收组分页查询
     *
     * @param baseReceiveGroupQry
     * @return
     */
    PageInfo<BaseReceiveGroupDTO> page(BaseReceiveGroupQry baseReceiveGroupQry);

    /**
     * 根据id删除接收组(逻辑删除)
     *
     * @param id
     * @return
     */
    int deleteById(Long id);

    /**
     * 更新接收组
     *
     * @param cmd
     * @return
     */
    int update(BaseReceiveGroupUpdateCmd cmd);

    /**
     * 新增接收组
     *
     * @param cmd
     */
    void add(BaseReceiveGroupAddCmd cmd);

    /**
     * 查询接收组
     *
     * @param id
     * @return
     */
    BaseReceiveGroupDTO get(Long id);

    /**
     * 根据租户编码、接收组编码查询接收组
     *
     * @param tenantCode
     * @param receiveGroupCodes
     * @param isEnabled
     * @return
     */
    List<BaseReceiveGroupDTO> selectList(String tenantCode, List<String> receiveGroupCodes, String isEnabled);

    /**
     * 根据接收组编码获取接收组
     *
     * @param receiveGroupCode
     * @return
     */
    BaseReceiveGroupDTO getByReceiveGroupCode(String receiveGroupCode);

    /**
     * 查询接收组(单个)
     *
     * @param qry
     * @return
     */
    BaseReceiveGroupDTO get(BaseReceiveGroupQry qry);

    /**
     * 查询接收组(多个)
     *
     * @param qry
     * @return
     */
    List<BaseReceiveGroupDTO> getList(BaseReceiveGroupQry qry);
}
